#include <stdio.h>
#include <stdlib.h>

void test_exit(int status,void * args){
    printf("status:%d\n",status); 
    void **p=  args;
    printf("%d\n", *(int *)(*p));
    printf("%c\n", *(char *)(*(p+1)));
    printf("%f\n", *(double *)(*(p+2)));
    printf("\n");
}

int main(){
    printf("start main\n");
    printf("end main\n");
    int a=1;
    char b = 'a';
    double c = 1.1; 
    void *p[3] = {(void *)&a,(void *)&b,(void *)&c};
    on_exit(test_exit,p);
    exit(100);
}